</head>
<body>
<div class="f-sep10"></div>
<div class="f-sep10"></div>
<div class="m-hd m-tabs">
<h2 class="u-tt">{$info.name}模型管理</h2>
	<div class="more"><a href="javascript:;" onClick="window.location.reload();"><span class="icon">&#xf021;</span> 刷新</a></div>
    <ul>
        <li><a class="z-crt" href="javascript:;"><span class="icon">&#xf101;</span> 模型列表</a></li>
		<li><a class="opentab" href="javascript:void(0);"  title="添加扩展字段" url="<?php echo url('admin_list/add',array('mid'=>$info['mid'])); ?>" ><span class="icon">&#xf067;</span> 添加{$info.name}字段</a></li>
    </ul>
</div>
<div class="m-list-table">
<table class="m-table m-table-row tablesorter" id="table">
    <thead>
    	
      <tr>
        <th class="cola">排序</th>
        <th>字段名称</th>
        <th>字段</th>
        <th class="cola">类型</th>
        <th class="cola">验证</th>
        <th class="cola">操作</th>
      </tr>
    </thead>
    <tbody>
    	<!--foreach:{$list $vo}-->
        <tr>
        <td>{$vo.sequence}</td>
        <td>{$vo.name}</td>
        <td>{$vo.field}</td>
        <td>{$vo.type_name}</td>
        <td>
		<?php $vo['verification']=unserialize($vo['verification']); ?>
        <!--if:{$vo['verification']}-->
        <font color=green><b>√</b></font>
        <!--{else}-->
        <font color=red><b>×</b></font>
        <!--{/if}-->
        </td>
        <td>
        <a class="opentab operating" href="javascript:void(0);"  title="编辑{$vo.name}扩展模型" url="<?php echo url('admin_list/edit',array('fid' => $vo['fid'])) ?>" ><span class="icon">&#xf040;</span> 修改</a>
        <a class="operating" href="javascript:void(0);" onClick="del('{$vo.fid}',this)"><span class="icon">&#xf014;</span> 删除</a>
         </td>
      </tr>
        <!--{/foreach}-->
    </tbody>
</table>
</div>
</body>
<script>
var del = new function(){}; 
Do.ready('base','dialog', function() {
	//扩展模型删除
	window.del = function del(fid,obj) {
		ajaxpost({
		name:'删除此字段会删除字段下的内容！',
		url:'{$url(admin_list/del)}',
		data:{fid:fid,mid:'{$info.mid}'},
		tip:true,
		success:function(){
			$(obj).parent().parent().remove();
			}
		});
	}
});
</script>